<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            background-color: blueviolet;
            width: 100px;
            height: 100px;
        }
        div::after{
            width: 50px;
            height: 50px;
            background-color: crimson;
        }
    </style>
</head>
<body>
    <div>
        11111111111
    </div>
    <script>
        var divEle = document.querySelector("div");
        var res = getComputedStyle(divEle)['width'] ;
        var res1 = getComputedStyle(divEle,'after')['backgroundColor']
        console.log(res);
        console.log(res1);
    </script>
</body>
</html>